<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
      lang="zh-CN">
<head>
    <title>仓库分布图</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <link rel="icon" href="/resources/favicon.ico">
    <link rel="stylesheet" href="resources/layui/css/layui.css" th:href="@{/resources/layui/css/layui.css}" media="all"/>
    <link rel="stylesheet" th:href="@{/resources/css/public.css}" media="all"/>
    <link rel="stylesheet" th:href="@{/resources/layui_ext/dtree/dtree.css}" media="all"/>
    <link rel="stylesheet" th:href="@{/resources/layui_ext/dtree/font/dtreefont.css}" media="all"/>
    <style>
        body,
        html,
        #allmap {
            overflow: hidden;
            width: 100%;
            height: 100%;
            margin: 0;
            font-family: "微软雅黑";
        }
    </style>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=1.0&ak=KdLcYsgiCQWXSpwuW4ovYMpLzfdkIROj"></script>
    <script src="https://cdn.staticfile.org/echarts/4.3.0/echarts.min.js"></script>
    <script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts-gl/echarts-gl.min.js"></script>
    <script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/map/js/china.js"></script>
    <script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/map/js/world.js"></script>
    <script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/extension/bmap.min.js"></script>
    <script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/simplex.js"></script>
</head>
<body>
<!-- 为ECharts准备一个具备大小（宽高）的Dom -->
<div id="allmap" style="width: 2000px;height:1500px;"></div>
</body>
</html>


<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    // 百度地图API功能
    var map = new BMap.Map("allmap");    // 创建Map实例
    map.centerAndZoom(new BMap.Point(119.27296, 26.0479), 11);  // 初始化地图,设置中心点坐标和地图级别
    map.enableScrollWheelZoom(true);
    // 创建点标记
    var marker1 = new BMap.Marker(new BMap.Point(119.1311, 26.1498));//闽侯县
    var marker2 = new BMap.Marker(new BMap.Point(119.3042, 26.082100));//鼓楼
    var marker3 = new BMap.Marker(new BMap.Point(119.31414, 26.0527));//台江
    var marker4 = new BMap.Marker(new BMap.Point(119.4556, 25.98939));//马尾
    var marker5 = new BMap.Marker(new BMap.Point(119.3375, 26.084));//晋安县
    var marker6 = new BMap.Marker(new BMap.Point(118.99472, 25.41878));//莆田城厢
    var marker7 = new BMap.Marker(new BMap.Point(118.79695, 25.03065));//泉州惠安县

    // 在地图上添加点标记
    map.addOverlay(marker1);
    map.addOverlay(marker2);
    map.addOverlay(marker3);
    map.addOverlay(marker4);
    map.addOverlay(marker5);
    map.addOverlay(marker6);
    map.addOverlay(marker7);

    //添加地图类型控件
    map.addControl(new BMap.MapTypeControl({
        mapTypes:[
            BMAP_NORMAL_MAP,
            BMAP_HYBRID_MAP
        ]}));

</script>

